3.811 \(\int \frac{(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^3} \, dx\)

Optimal. Leaf size=193 \[ \frac{(f+g x)^{n+1} \left (a e g^2 (1-n) n-c \left (d^2 g^2 \left (-n^2+n+2\right )-4 d e f g+2 e^2 f^2\right )\right ) \, _2F_1\left (1,n+1;n+2;\frac{e (f+g x)}{e f-d g}\right )}{2 e (n+1) (e f-d g)^3}-\frac{g (1-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{2 e (d+e x) (e f-d g)^2}-\frac{\left (a-\frac{c d^2}{e}\right ) (f+g x)^{n+1}}{2 (d+e x)^2 (e f-d g)} \]

[Out]

-((a - (c*d^2)/e)*(f + g*x)^(1 + n))/(2*(e*f - d*g)*(d + e*x)^2) - ((c*d^2 - a*e
)*g*(1 - n)*(f + g*x)^(1 + n))/(2*e*(e*f - d*g)^2*(d + e*x)) + ((a*e*g^2*(1 - n)
*n - c*(2*e^2*f^2 - 4*d*e*f*g + d^2*g^2*(2 + n - n^2)))*(f + g*x)^(1 + n)*Hyperg
eometric2F1[1, 1 + n, 2 + n, (e*(f + g*x))/(e*f - d*g)])/(2*e*(e*f - d*g)^3*(1 +
 n))

_______________________________________________________________________________________

Rubi [A]  time = 0.468345, antiderivative size = 193, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.107 \[ \frac{(f+g x)^{n+1} \left (a e g^2 (1-n) n-c \left (d^2 g^2 \left (-n^2+n+2\right )-4 d e f g+2 e^2 f^2\right )\right ) \, _2F_1\left (1,n+1;n+2;\frac{e (f+g x)}{e f-d g}\right )}{2 e (n+1) (e f-d g)^3}-\frac{g (1-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{2 e (d+e x) (e f-d g)^2}-\frac{\left (a-\frac{c d^2}{e}\right ) (f+g x)^{n+1}}{2 (d+e x)^2 (e f-d g)} \]

Antiderivative was successfully verified.

[In]  Int[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^3,x]

[Out]

-((a - (c*d^2)/e)*(f + g*x)^(1 + n))/(2*(e*f - d*g)*(d + e*x)^2) - ((c*d^2 - a*e
)*g*(1 - n)*(f + g*x)^(1 + n))/(2*e*(e*f - d*g)^2*(d + e*x)) + ((a*e*g^2*(1 - n)
*n - c*(2*e^2*f^2 - 4*d*e*f*g + d^2*g^2*(2 + n - n^2)))*(f + g*x)^(1 + n)*Hyperg
eometric2F1[1, 1 + n, 2 + n, (e*(f + g*x))/(e*f - d*g)])/(2*e*(e*f - d*g)^3*(1 +
 n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 37.2965, size = 95, normalized size = 0.49 \[ \frac{c \left (f + g x\right )^{n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, n + 1 \\ n + 2 \end{matrix}\middle |{\frac{e \left (- f - g x\right )}{d g - e f}} \right )}}{e \left (n + 1\right ) \left (d g - e f\right )} + \frac{g^{2} \left (f + g x\right )^{n + 1} \left (a e - c d^{2}\right ){{}_{2}F_{1}\left (\begin{matrix} 3, n + 1 \\ n + 2 \end{matrix}\middle |{\frac{e \left (- f - g x\right )}{d g - e f}} \right )}}{e \left (n + 1\right ) \left (d g - e f\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((g*x+f)**n*(c*e*x**2+2*c*d*x+a)/(e*x+d)**3,x)

[Out]

c*(f + g*x)**(n + 1)*hyper((1, n + 1), (n + 2,), e*(-f - g*x)/(d*g - e*f))/(e*(n
 + 1)*(d*g - e*f)) + g**2*(f + g*x)**(n + 1)*(a*e - c*d**2)*hyper((3, n + 1), (n
 + 2,), e*(-f - g*x)/(d*g - e*f))/(e*(n + 1)*(d*g - e*f)**3)

_______________________________________________________________________________________

Mathematica [A]  time = 0.232944, size = 0, normalized size = 0. \[ \int \frac{(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^3} \, dx \]

Verification is Not applicable to the result.

[In]  Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^3,x]

[Out]

Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^3, x]

_______________________________________________________________________________________

Maple [F]  time = 0.109, size = 0, normalized size = 0. \[ \int{\frac{ \left ( gx+f \right ) ^{n} \left ( ce{x}^{2}+2\,cdx+a \right ) }{ \left ( ex+d \right ) ^{3}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^3,x)

[Out]

int((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^3,x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (c e x^{2} + 2 \, c d x + a\right )}{\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^3,x, algorithm="maxima")

[Out]

integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^3, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (c e x^{2} + 2 \, c d x + a\right )}{\left (g x + f\right )}^{n}}{e^{3} x^{3} + 3 \, d e^{2} x^{2} + 3 \, d^{2} e x + d^{3}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^3,x, algorithm="fricas")

[Out]

integral((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e^3*x^3 + 3*d*e^2*x^2 + 3*d^2*e*x
+ d^3), x)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\left (f + g x\right )^{n} \left (a + 2 c d x + c e x^{2}\right )}{\left (d + e x\right )^{3}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x+f)**n*(c*e*x**2+2*c*d*x+a)/(e*x+d)**3,x)

[Out]

Integral((f + g*x)**n*(a + 2*c*d*x + c*e*x**2)/(d + e*x)**3, x)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (c e x^{2} + 2 \, c d x + a\right )}{\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^3,x, algorithm="giac")

[Out]

integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^3, x)